package cn.xej.health.team.feign;

import cn.xej.health.common.utils.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author xej
 */
@FeignClient("health-user")
public interface UserFeignService {

    /**
     * 获取所有责任医生
     * @return
     */
    @GetMapping("/user/captainList")
    CommonResult captainList();

    /**
     * 获取用户信息
     * @param uuid
     * @return
     */
    @GetMapping("/user/getUser/{uuid}")
    CommonResult getUser(@PathVariable("uuid") Integer uuid);

    /**
     * 获取该团队的医生
     * @param tid
     * @param pageIndex
     * @param pageSize
     * @param searchName
     * @return
     */
    @PostMapping("/user/initMemberList/{tid}")
    CommonResult initMemberList(@PathVariable("tid")Integer tid, @RequestParam("pageIndex")Integer pageIndex, @RequestParam("pageSize")Integer pageSize, @RequestParam("searchName")String searchName);

    /**
     * 获取剩余的医生
     * @return
     */
    @GetMapping("/user/initRemainUserList")
    CommonResult initRemainUserList();

    /**
     * 根据用户编号获取用户信息
     * @param uuidList
     * @return
     */
    @GetMapping("/user/getTeamDockerList")
    CommonResult getTeamDockerList(@RequestParam("uuidList") String uuidList);
}
